
/* 使用该函数，用于同意添加节点和销毁节点 */
import {onUnmounted} from 'vue'
function useDOMCreate(nodeId:string) {
    const node = document.createElement('div')
    node.id = nodeId
    document.body.appendChild(node)

    onUnmounted(() => {
        document.body.removeChild(node)
    })
}

export default useDOMCreate